home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / forth / pfe-0.000 / pfe-0 / pfe-0.9.13 / INSTALL < prev    next >
Encoding:
Text File  |  1995-05-20  |  23.0 KB  |  657 lines

  1. COMPILING THE PORTABLE FORTH ENVIRONMENT        -*- indented-text -*-
  2. ########################################
  3.  
  4. I tried to make porting easy by using ANSI-C or POSIX features
  5. whereever possible.
  6.  
  7. Currently the program is tested by myself with these systems:
  8.  
  9.     - 486DX33 PC running Linux (development platform)
  10.     - 486DX33 PC running FreeBSD
  11.     - 486DX33 PC running Novell DOS 7 and OS/2 Warp
  12.     - IBM RS/6000 520H running AIX 3.2
  13.     - IBM PS/2 Model 70 running AIX 1.2
  14.     - HP 9000/735 running HP-UX A.09.01 A
  15.     - DECstation 500/520 with Ultrix 4.3.0 RISC
  16.     - DEC 3000 workstation (alpha) running OSF/1 2.1
  17.         ( S" MAX-D" ENVIRONMENT? DROP D.
  18.           39614081238685424727357390847 ok :-)
  19.  
  20. Others ran it on SGI with IRIX, SunOS (but not Solaris), DomainOS,
  21. Xenix and other Intel based System V unices.
  22. Any reasonably up to date Unix system with a true ANSI-C compiler
  23. should do it with little changes. Please report any problems, I'll
  24. try to make it easier for you if you do!
  25.  
  26. A configuration script is provided in src/config.sh.
  27.  
  28.  
  29. How to configure and compile on a Unix system:
  30. ==============================================
  31.  
  32. Please read the file `tuning' too.
  33.  
  34. Overview
  35.  
  36. 1) If your system is one of Linux, FreeBSD, NeXT, AIX 3.2, AIX 1.2,
  37.    HP-UX on HP 400/700/800, DEC Ultrix RISC or OSF/1 2.1 on a DEC Alpha:
  38.  
  39.    Simply change to directory pfexxx/src and type `sh config.sh'
  40.    or `ksh config.sh' if a ksh is available.  This makes two
  41.    important files:
  42.  
  43.     Makefile    contains compiler options and dependencies
  44.  
  45.     config.h    contains several #define-d symbols controlling
  46.             the compilation of environmental dependencies.
  47.  
  48.    Now type make and wait for the compilation to finish. That should
  49.    be all.
  50.  
  51. 2) If your Unix-system is not among those I tried, things are only
  52.    a little more difficult.  Change to directory pfexxx/src and
  53.    type `[k]sh config.sh'. Again this generates two files:
  54.  
  55.     makefile    dependencies and a generic version of
  56.             compiler options
  57.  
  58.     config.h    #define-d symbols describing your system as
  59.             result of an investigation of your system's
  60.             libraries and header files
  61.  
  62.    Now check these two files.
  63.  
  64.    In `Makefile' change compiler options for best performance with
  65.    your compiler and machine. Set compiler option -D_BSD if neccessary
  66.    (see below). In `Makefile' set compiler options -D_XYZ_SOURCE if
  67.    your header files are conditionalized to enable all definitions
  68.    available on your system. Then try a first time to compile. If all
  69.    goes well, ok. Don't run config.sh again in that case! But that's
  70.    unlikely.
  71.  
  72.    Otherwise forget about your changes to Makefile and (I suppose your
  73.    current directory is .../pfexxx/src)
  74.  
  75.     mkdir config/`uname`
  76.     cp config/default/options.mk config/`uname`
  77.     vi config/`uname`/options.mk
  78.  
  79.    and repeat the changes you made to Makefile in this system specific
  80.    version of `options.mk'. This is because `config.sh' each time it
  81.    runs builds a new `Makefile' from the following parts
  82.  
  83.     config/`uname`/header.mk     # comments only
  84.     config/`uname`/basics.mk     # definitions of suffixes, separators
  85.     config/`uname`/options.mk    # compiler options
  86.     config/`uname`/rules.mk         # additional Make rules, .c.obj: etc.
  87.     config/`uname`/depend.mk     # the dependencies
  88.  
  89.    if one of these is missing, `config.sh' uses "config/default/*"
  90.    instead. Sort of object oriented concept, you see the "inheritance"
  91.    priciple here? :-) Put the other way round: In "config/default/*.mk"
  92.    a complete Makefile is provided. You can override parts of that
  93.    in a system specific "config/`uname`/*.mk".
  94.  
  95.  
  96.    `config.h' may need some overworking since the header files on many
  97.    systems contain quite confusing conditional constructs. Not
  98.    everything the config.sh script finds in them becomes really
  99.    declared when they are included. I improved that significantly by
  100.    employing the preprocessor along with grep to find out what's
  101.    defined in your system. On the systems I tried (including OS/2 with
  102.    emx/gcc and with Watcom C) `config.h' is ok without manual changes.
  103.  
  104.    If you don't seem to have definitions that `config.sh' finds in
  105.    your header files or if `config.sh' doesn't find definitions
  106.    that you know your system has, then check the header files of
  107.    your system (usually in /usr/include) if these definitions are
  108.    conditional. Often important things only get declared when a certain
  109.    preprocessor symbol is defined. Possible such symbols to look for are:
  110.  
  111.     _POSIX_SOURCE
  112.     _XOPEN_SOURCE
  113.     _yoursystem_SOURCE
  114.  
  115.    If you find lots of `#ifdef _yxz_SOURCE' around the important
  116.    declarations then define that symbol in a commandline option
  117.    like this in file src/config/`uname`/options.mk :
  118.  
  119.     OPTIONS = -D_xyz_SOURCE ...
  120.  
  121.    Check config.h for neccessary changes according to the next section
  122.    below. Most important: check if you should set the -D_BSD-switch.
  123.    Then compile the system with make.
  124.  
  125.  
  126. Options in config.h
  127. -------------------
  128.  
  129. At the time of this writing, the config script checks for the
  130. following conditions. When you read this, a few more may have been
  131. added. So have a look at what the script `guesscfg.sh' tries to do
  132. (unlike the scripts generated by GNU autoconfigure it's quite easy
  133. to read), if you experience problems you can't solve with these
  134. informations:
  135.  
  136. HAVE_AH_TRIG    define this if your system has asinh, acosh, atanh
  137.         defined in it's -lm library and math.h header.
  138.  
  139. HAVE_MEMMOVE    define this if your system has memmove() in it's
  140.         library. Else write this prototype in config.h:
  141.  
  142.         void memmove (char *, const char *, const unsigned);
  143.  
  144. HAVE_STRDUP    define this if your system has strdup() declared in
  145.         string.h. Else define a prototype like this:
  146.  
  147.         char *strdup (const char *);
  148.  
  149. If your system hasn't strerror but has a global variable sys_errlist[],
  150. then define this:
  151.  
  152.         #define strerror(x) sys_errlist [x]
  153.  
  154. HAVE_SYS_SIGLIST define this if your system has the global variable
  155.         char *sys_siglist[] containing signal names.
  156.  
  157.  
  158. atexit() availability:
  159.  
  160.     #define eXit(X) exit(X)
  161.  
  162.         define this if your system has atexit(). Otherwise
  163.         declare like this:
  164.  
  165.     typedef void (*atexit_fp) (void);
  166.     int atexit (atexit_fp);
  167.     void eXit (int);
  168.  
  169. HAVE_RAISE    define this if your system has the raise() function.
  170.         Otherwise define like this:
  171.  
  172.     #define raise(X) kill (getpid (), X)
  173.  
  174. HAVE_REMOVE    define this if your system has remove(), otherwise
  175.  
  176.     #define remove unlink
  177.  
  178. HAVE_RENAME    define this if your system has rename(), otherwise
  179.         provide the following prototype:
  180.  
  181.     int rename (const char *, const char *);
  182.  
  183. HAVE_TERMCAP    define this if your system has a libtermcap.a.
  184.         If this is used depends on the constant USE_TERMCAP
  185.         described below.
  186.  
  187. HAVE_TERMIO_H, HAVE_TERMIOS_H, HAVE_TERMCAP_H
  188.         define them if the respective header files are
  189.         available. If both termios.h and termio.h then
  190.         termios.h is used by pfe and defining HAVE_TERMIO_H
  191.         is meaningless.
  192.  
  193. HAVE_USLEEP    define this, if usleep() is available in your system
  194. HAVE_POLL    define this if you haven't usleep() but have poll()
  195. HAVE_SELECT    define this if you haven't usleep() but have select(),
  196.         pointless if poll() is available.
  197.  
  198.         If you have none of the three, think of a method to
  199.         wait some milliseconds and rewrite the function
  200.         millisec in `src/unix.c'.
  201.         Otherwise the Forth-word MS will perform very poorly.
  202.  
  203. ISO_CHARSET    the config-script simply defines this symbol because
  204.         most workstations have these ISO characters. If you
  205.         don't see letters here "DV\dv|_", then your system
  206.         has no ISO characters or (more likely) your terminal
  207.         connection, your `more' or whoknowswhatelse isn't
  208.         set up to handle 8-Bit characters. If you remove the
  209.         symbol from config.h, pfe takes care not to display
  210.         these characters but a reverse `?'.
  211.  
  212. IBMPC_CHARSET    an alternative to ISO_CHARSET assumed on DOS and OS/2.
  213.  
  214. OLDCPP        define this if your C-compiler's preprocessor is
  215.         pre-ANSI and can't handle macro arguments padded
  216.         together with ##.
  217.  
  218. WRONG_SPRINTF    some libraries have sprintf returning the string, not
  219.         the string length as function result (old versions of
  220.         SunOS).  If your system has this feature, define the
  221.         symbol.
  222.  
  223. If your compiler can't handle the const-keyword, define like this:
  224.  
  225.     #define const
  226.  
  227.  
  228. IMPORTANT:
  229. ----------
  230. More important options where the config script makes no attempt to
  231. check them out:
  232.  
  233. _BSD        define this to 1 if your system is BSD-like.
  234.         It triggers a slightly different signal handling.
  235.         SunOS, DomainOS, FreeBSD, Ultrix and probably many
  236.         more systems need this switch. If you haven't set
  237.         this switch on a system that needs it, you'll get
  238.         problems with job control.
  239.  
  240. USE_TERMCAP
  241. USE_TERMINFO
  242. ASSUME_VT100    pfe can use three slightly different methods to
  243.         retrieve information about the connected terminal.
  244.  
  245.           - termcap calls to a termcap library
  246.             (if HAVE_TERMCAP_H is set, i.e. you have a real
  247.             termcap library) or termcap calls emulated by a
  248.             curses library depending on the available library.
  249.  
  250.           - terminfo calls to a curses library.
  251.  
  252.           - unconditionally assume a vt100 or xterm is used.
  253.  
  254.         If your system has both a termcap and a curses library
  255.         with terminfo calls, then test which setting yields better
  256.         results.
  257.         If your system has only curses then using the termcap
  258.         emulation in curses instead of terminfo is probably
  259.         pointless.
  260.  
  261.  
  262. Which compiler should be used?
  263. ------------------------------
  264.  
  265. On a unix system with a modern ANSI C compiler this compiler can be
  266. used.  On a RISC-machine the original compiler may be faster than
  267. GNU-C (RS/6000, DEC Ultrix RISC) but only if you haven't used the
  268. global register variable feature of gcc (see file `src/virtual.h').
  269. With this optimization enabled gcc is undefeatable.
  270.  
  271. If the system vendor's compiler is old and/or buggy and/or produces
  272. slow code, you better switch to gcc. Any gcc will do fine. The eldest
  273. I recently tried was version 1.42.
  274.  
  275. You can compile pfe with a C++ compiler too (tested with g++).
  276.  
  277.  
  278. Which warning level should be used?
  279. -----------------------------------
  280.  
  281. The source code of pfe passes gcc and other compilers at the highest
  282. warning level with very few harmless warnings, provided that the
  283. header files of the system are ok. Unfortunately sometimes the system
  284. header files don't pass gcc at this warning level without a lot of
  285. noise. Or they compile ok but lack prototypes they should contain.
  286. This leads to warnings lateron in the pfe source. Reduce the warning
  287. level in that case.
  288.  
  289. If you are forced to do so (by your header files) you can even compile
  290. pfe with gcc -traditional. In this case define like this in config.h:
  291.  
  292.     #define OLDCPP 1
  293.     #define const
  294.  
  295. The config script should do this if you provided the -traditional flag
  296. in config/`uname`/options.mk. Expect a lot of warnings about
  297. incompatible pointers. But it seems to work (when I tried last time on
  298. Linux at least :-).
  299.  
  300.  
  301. How to port to a non-Unix system:
  302. =================================
  303.  
  304. The script `config.sh' can be run on some non-unix systems too if
  305. you install a Bourne or Korn shell. I ran it with every shell I
  306. could get my hands on and I think it's portable to every Bourne
  307. shell that knows shell functions. I used it on FreeBSD and Linux
  308. with ash, bash, pdksh, zsh, on AIX and OSF/1 with sh and ksh, on
  309. Ultrix and HP-UX with ksh (their sh's don't know shell functions).
  310.  
  311. On OS/2 I successfully used bash 1.12 but ran into trouble when
  312. saving the scripts with CR/LF line ends. Use recode ibmpc:latin1
  313. after editing the scripts when your editor saved with DOS-style
  314. line ends.  With PD korn shell 4.9 first start the shell and use
  315. the `.' operator to run the script. The ms_shell dies from some
  316. internal bug.
  317.  
  318. If you can, get a shell and those few unix utilities (a good make
  319. in the first place) and try to get config.sh to run. Make a
  320. subdirectory `config/yoursystem' and copy the makefile-parts from
  321. `config/default' to that place. Change what is neccessary. See
  322. config/WATCOM for an example of more extensive changes. This compiler
  323. isn't unix-like at all.
  324.  
  325. If you can't run `config.sh' then compile `src/check_c.c' with the
  326. C-compiler you want to use, run it and place it's output in a file
  327. `config.h'.  Read the above section and the more up to date scriptfile
  328. `guesscfg.sh' about options in config.h and edit config.h to describe
  329. your system. Refer to your C-compiler's documentation and header
  330. files.
  331.  
  332. Write at least one new source file for the terminal stuff. Check
  333. `src/term.h' for which definitions are exported by the terminal
  334. driver and rewrite them from scratch e.g. in a file called
  335. `src/term-st.c' for an Atari. Then set the variable TERM_O in
  336. Makefile to your file's name, e.g. `term-st.o'.  For an example
  337. you can refer to `src/termunix.c' (complex), `src/term-emx.c'
  338. (recommended) or `src/curses.c'.
  339.  
  340.  
  341. Configuring the Forth system
  342. ============================
  343.  
  344. Besides the options you have to set to make pfe compile on your system
  345. you can configure features of the Forth-system.
  346.  
  347. Many of these options can be set at startup of pfe on the command
  348. line. Some more options and defaults for these command line options
  349. can be set in the source file `src/options.h'.
  350.  
  351. You should set convenient defaults at least for
  352.  
  353.   - search paths for block files and including source
  354.   - your favorite text-file editor
  355.   - the amount of memory the system uses
  356.  
  357. The system might crash if the default system size or the size for the
  358. stacks is too small. You'll need a stack-size of at least 1024 items
  359. (just a guess :-).
  360.  
  361. After the program compiled without errors you can test it with the
  362. program `test/suite.4th' by either typing
  363.  
  364.     make testit
  365. or
  366.     cd ../test
  367.     ../src/pfe suite
  368.  
  369. at the shell prompt.
  370. If it passes these tests it should be pretty much ok!
  371.  
  372.  
  373. INSTALLATION
  374. ============
  375.  
  376. The executable file pfe[.exe] is the only file you need to run any ANS
  377. Forth program. It provides all word sets without need to load anything
  378. else. Therefore all you have to install is this executable somewhere
  379. in the search path.
  380.  
  381. If you want to use online help, refer to the files in the subdirectory
  382. `help' for installation instructions and for how you can contribute to
  383. online help for this and other free Forth systems.
  384.  
  385. As you see in file `src/options.h', pfe looks for INCLUDED files and
  386. for block files in certain locations. If you choose to install sources
  387. there, they become available from any location in your file system
  388. without path name. Also there are default extensions you won't have to
  389. type when referring to a block file or source text file by name.
  390.  
  391. Using these features is entirely up to you and your needs/taste. The
  392. makefile has no `install' target creating any directories or copying
  393. any files.
  394.  
  395. ---
  396. End of instructions about compiling and installing pfe.
  397. Hope you like it! -duz
  398.  
  399.  
  400.  
  401. ======================================================================
  402. Hints for certain systems follow:
  403. ======================================================================
  404.  
  405. X-Window's xterm vt100 emulator
  406. ===============================
  407.  
  408. Most /etc/termcap files out there are out of date. I really don't
  409. understand how system vendors and distributors can be so ignorant.
  410.  
  411. Below you find the "official" termcap entry for the xterm terminal
  412. emulator as distributed by the X-Consortium. Please replace the
  413. rubbish you find in your /etc/termcap with this one. Then all keys
  414. work as expected. Some other programs will benefit too from the
  415. change.
  416.  
  417. -----cut here-----
  418. # $XConsortium: termcap,v 1.12 94/04/12 15:01:29 gildea Exp $
  419. #
  420. vs|xterm|xterm-24|xterms|vs100|xterm terminal emulator (X Window System):\
  421.     :is=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:\
  422.     :rs=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:\
  423.     :AL=\E[%dL:DL=\E[%dM:DC=\E[%dP:DO=\E[%dB:UP=\E[%dA:\
  424.     :LE=\E[%dD:RI=\E[%dC:\
  425.     :al=\E[L:am:\
  426.     :bl=^G:\
  427.     :bs:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:co#80:\
  428.     :cs=\E[%i%d;%dr:ct=\E[3g:\
  429.     :dc=\E[P:dl=\E[M:\
  430.     :ho=\E[H:\
  431.     :im=\E[4h:ei=\E[4l:mi:\
  432.     :ks=\E[?1h\E=:ke=\E[?1l\E>:\
  433.     :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\
  434.     :k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:\
  435.     :k;=\E[21~:\
  436.     :F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:F5=\E[28~:\
  437.     :F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:FA=\E[34~:\
  438.     :kn#20:\
  439.     :@0=\E[1~:kI=\E[2~:kD=\E[3~:\
  440.     :*6=\E[4~:kP=\E[5~:kN=\E[6~:\
  441.     :km:\
  442.     :kb=^H:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:\
  443.     :li#24:md=\E[1m:me=\E[m:mr=\E[7m:ms:nd=\E[C:pt:\
  444.     :eA=\E)0:as=^N:ae=^O:\
  445.     :ml=\El:mu=\Em:\
  446.     :sc=\E7:rc=\E8:sf=\n:so=\E[7m:se=\E[m:sr=\EM:\
  447.     :ti=\E7\E[?47h:te=\E[2J\E[?47l\E8:\
  448.     :up=\E[A:us=\E[4m:ue=\E[m:xn:
  449. v2|xterm-65|xterm with tall window 65x80 (X Window System):\
  450.     :li#65:tc=xterm:
  451. vb|xterm-bold|xterm with bold instead of underline (X Window System):\
  452.     :us=\E[1m:tc=xterm:
  453. #
  454. # vi may work better with this entry, because vi
  455. # doesn't use insert mode much
  456. vi|xterm-ic|xterm-vi|xterm with insert character instead of insert mode:\
  457.     :im=:ei=:mi@:ic=\E[@:IC=\E[%d@:tc=xterm:
  458. -----cut here-----
  459.  
  460.  
  461. Linux
  462. =====
  463.  
  464. Since pfe was developed on a Linux box, there are no serions problems.
  465.  
  466.  - On -- recent -- versions of Linux the C-library function ldexp()
  467.    seems to fail. The testsuite tries to do D>F and hangs at that
  468.    point.
  469.  
  470.  - On some versions of Linux it was neccessary to issue `stty -ixon'
  471.    before starting pfe. I try to do this setting from inside pfe but
  472.    this fails on these versions. It isn't needed in recent releases.
  473.  
  474.  - If you want to use the curses-based terminal driver curses.c, then
  475.    you'll have to add a command line option in the makefile:
  476.  
  477.     OPTS=-I/usr/include/ncurses
  478.  
  479.  - It's not a good idea to remap xterm's cursor and function keys
  480.    using ~/.Xdefaults or ~/.Xresources like it is sometimes
  481.    recommended in order please `bash' or `less'. These programs should
  482.    better use curses or termcap like any other decent program instead
  483.    of defining their own startup files containing hardwired key
  484.    codes. If more programs relied on it then probably /etc/termcap
  485.    would be in better shape too.
  486.  
  487. =======================================================================
  488.  
  489. FreeBSD
  490. =======
  491.  
  492. - FreeBSD 1.1 comes with gcc 2.4.5. The i386 version of that compiler
  493.   dies when global register variables are used.
  494.  
  495. - FreeBSD 2.0: make has problems with a default rule `.c:'.
  496.   One step -- compiling a C test program -- in the autoconfiguration
  497.   depends on such a default rule. Before running `sh config.sh' make
  498.   sure gnu-make preceedes the BSD make in the search path.
  499.  
  500. =======================================================================
  501.  
  502. NeXTstep
  503. ========
  504.  
  505. I have NeXTstep for Intel vs. 3.2. That one was a real bitch.
  506. Compiling with -posix did solve the problem of numerous undefined
  507. poxix-like functions. It was so buggy however that it couldn't be done
  508. that way. I had to rewrite the unix terminal driver to adapt to the
  509. ancient system calls supported by NeXTstep without -posix.
  510.  
  511. Forget about running the config script with Next's sh. You can use
  512. bash. You can't run the config script with Next's cc either since --
  513. I guess, the man page says nothing -- the precompiled headers feature
  514. fools it.
  515.  
  516. You can compile with Next's cc after copying the configuration I built
  517. with gcc:
  518.  
  519.     cd src
  520.     cp config/NeXTstep/config.h-cc config.h
  521.     cp config/NeXTstep/Makefile-cc Makefile
  522.     make
  523.  
  524. You should use gcc anyway because NeXT's cc can't do global register
  525. variables.
  526.  
  527. =======================================================================
  528.  
  529. IRIX SGI installation.
  530. ======================
  531.  
  532. Sean Conner reports the following problem and fix related to SGI
  533. machines:
  534.  
  535. > NOTE:  There have been some problems with the SGI port. If you are
  536. > compiling the system under IRIX 4.0.1 and using the supplied C compiler,
  537. > then you have to define SGIFIX.  Any later release, or using gcc, will
  538. > avoid this problem.            spc@pineal.math.fau.edu
  539.  
  540. (diffs to pfe-0.8.6)
  541.  
  542. =====Makefile=====
  543. 89a90,96
  544. >   #####################################################
  545. >   # Due to a compiler bug in 4.0.1, if you use 4.0.1 cc
  546. >   # then you need to use the line with -DSGIFIX.  This is
  547. >   # ONLY WITH CC UNDER 4.0.1.  If you are using gcc, then
  548. >   # you don't need the fix.    spc@pineal.math.fau.edu
  549. >   ######################################################
  550. 90a98,103
  551. >   # CC =    cc
  552. >   # CC =     gcc
  553. >   CC =        cc -DSGIFIX
  554. >   OPTIMIZE =    -O
  555. >   DEBUG =    -g
  556. >   STRICT =
  557. =====support.c=====
  558. 169a170,187
  559. > /*******************************************************************
  560. > * NOTE: Because of a compiler bug in 4.0.1 of the SGI C compiler,
  561. > *     This stupid little routine has to be included for u_d_mul()
  562. > *    to work properly.  This bug, is of course, fixed for 4.0.5,
  563. > *    but we (where I work) can't afford to get the upgrade (at least
  564. > *    yet), so this patch is here for that.
  565. > *    
  566. > *    But, if you have gcc running under 4.0.1, it will compile this
  567. > *    correctly, so you don't need the fix in that case.  Since I
  568. > *    really don't like gcc all that much, I need to use this.
  569. > *
  570. > *            spc@pineal.math.fau.edu
  571. > *********************************************************************/
  572. > #ifdef SGIFIX
  573. >   void sgifix(uCell hi,uCell lo) { uCell c1 = hi; uCell c2 = lo; }
  574. > #endif
  575. 178a197,199
  576. > #       ifdef SGIFIX
  577. >       sgifix(ud->hi,ud->lo);
  578. > #    endif
  579.  
  580. ======================================================================
  581.  
  582. HP-UX
  583. =====
  584.  
  585. I never saw a C-compiler by HP with optimization not broken. You can
  586. use the lowest optimization +O1 at first, this works on the systems I
  587. have access to. +O2 and -O don't work (you get an error-message when
  588. typing return in pfe). gcc -O2 is faster than c89 +O1 but c89 +O2
  589. would probably again be faster than gcc -- if it only worked.
  590.  
  591. Again due to a compiler bug you must remove the const-keyword in the
  592. parameter list of function wild_words() in dictnry.c and in the header
  593. file support.h to compile with HP's compiler.
  594.  
  595. Since pfe starting with releas 0.9.8 supports the global register
  596. feature of gcc this compiler should be used anyway.
  597.  
  598.  
  599. Ultrix
  600. ======
  601.  
  602. The system's compiler compiles pfe fine. But it behaves strangely when
  603. it comes to floating point exceptions. I don't know why, use gcc and
  604. benefit from global register variables!
  605.  
  606. Add option -DHAVE_SELECT in Makefile or `MS' will resort to sleeping
  607. at least 1 sec...
  608.  
  609. ======================================================================
  610.  
  611. Sun
  612. ===
  613.  
  614. Solaris 2.3 on a Sparc workstation:
  615. -----------------------------------
  616.  
  617. pfe compiles without errors or warnings using gcc or a C++ beast by
  618. Sun called CC supplied as part of a development platform (we don't
  619. have Sun's ANSI-C compiler here). Unfortunately it doesn't run.  And
  620. after a few hours of digging with gdb I still don't have the faintest
  621. idea what's going wrong. Any hint is appreciated.
  622.  
  623. After another day of debugging, I think it's longjmp() that's buggy on
  624. my Solaris. In function support.c/run_forth() I rely on longjmp() to
  625. stop the inner interpreter. It affects every word like EVALUATE or
  626. LOAD that saves and restores the input stream calling run_forth() in
  627. between. It seems that the terminating longjmp() doesn't go to it's
  628. own setjmp but to the very first, lowest level. This causes loss of
  629. instruction pointer and the following effect:
  630.  
  631.     S" 1 2 3 . . ." EVALUATE
  632.     error EVALUATE segmentation violation.
  633.  
  634.  
  635. SunOS
  636. -----
  637.  
  638. there are reports that it runs on elder versions of Sun's OS (maybe on
  639. other machines than Sparc?). If you succeed please let me know.
  640.  
  641.  
  642. ======================================================================
  643.  
  644. Watcom C
  645. --------
  646.  
  647. pfe compiles fine with Watcom C. The problem is: I can't see how I can
  648. effectively catch exceptions like Ctl-C on the keyboard. The signal()
  649. mechanism doesn't work although IMHO according to the manual it
  650. should.
  651.  
  652. Until this is fixed better consider the Watcom port purely
  653. experimental.
  654.